package com.geek.novel.services.parser

import com.geek.novel.entity.BookCrawler
import com.geek.novel.entity.BookIndex
import com.geek.novel.entity.BookRead
import com.geek.novel.entity.CrawlerSource
import com.geek.novel.vo.CrawlConfigVo


interface NovelSectionParser {
	
	/**
	 * 解析书籍章节列表
	 * @param book  书籍对象
	 * @param html  书籍的html内容
	 * @return      返回整个书籍的列表索引
	 */
	fun parseBookIndex(crawlerSource: CrawlerSource, book: BookRead, bookCrawler: BookCrawler, html: String?): List<BookIndex>
	
	/**
	 * 获取章节的当前一页的文本内容
	 * @param html  章节某一页的内容
	 */
	fun getSectionContent(config: CrawlConfigVo, html: String?): String?
	
	/**
	 * 获取章节的下一页的url
	 * @param html  章节某一页的内容
	 */
	fun getSectionNextPageUrl(crawlerSource: CrawlerSource, html: String?): String?
	
}